home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Example Projects / Reusable Classes_Code / acgi framework 1.0 / READ ME < prev   
Encoding:
Text File  |  2000-01-14  |  4.1 KB  |  43 lines

  1. REALbasic ACGI Framework v1.0
  2. copywrite 1999, James Sentman <james@sentman.com>
  3. http://www.sentman.com/
  4. ______________________________________________________
  5.  
  6. This program is a Multi-Threaded macintosh ACGI framework with built in session managment for storing persistant variables.
  7.  
  8. This acgi framework is copywrite 1999 by James Sentman. It is free for personal and educational use as long as it retains a message in the about box and documentation that reads "Portions of this program written by James Sentman"
  9.  
  10. Commercial programs may make use of this framework providing that the same credit is given, a registered copy of the application is given to James Sentman and permission is given to list your application on the frameworks website. Licenses to use the framework without giving credit will be sold on a case by case basis.
  11.  
  12. If you use this framework and make changes, improvements or additions that might be usefull to others please return those to james@sentman.com for inclusion into the framework.
  13. ______________________________________________________
  14.  
  15. Using the framework:
  16.  
  17. I will be setting up a mailing list shortly for people using this framework.
  18.  
  19. The framework is a working demo. Compile the program and place it in the web root of your web server. Personal web Sharing is perfect for testing. Run the program and select Preferences from the edit menu. Select your server type from the popup and fill in the server address and link to the program. If you have just put the program into the root the link will be "/framework.acgi" This is necessary so that users can change the name of the program and not have to edit the html that might be embeded in the program.
  20.  
  21. The demo shows appending to an array stored in the session class.
  22.  
  23. Using the framework:
  24.  
  25. This is not a How To manual for CGI scripting and assumes you are already be familiar with the concepts of CGI and REALbasic programming.
  26.  
  27. The framework has no dependencies on plugins or other external resources.
  28.  
  29. This framework can do multi-threaded operation when working with WebStar, ASIP servers, WebTen and Quid Pro Quo servers and will function non-threaded for Personal Web Sharing and any other Mac webserver that supports the WEB* API. If you know of another server that supports threaded operation that is not included in the list let me know and I can add it to the framework.
  30.  
  31. Inside the framework you will initially want to work within 3 objects. Your cgi code will probably go into the "theCGI" object. This is a thread object that has it's code within the "CGI" method. This will be called threaded or non-threaded depending on the setup of the server. The "Cprefs" object I use to contain the preferences for the application, you can add yours to the end of my routines or replace them with your own. And finally the session class. A new session class is created for each user, any vars or other resources that you add to this will be available for each hit that user makes on the server. A reference to a users session class will be passed to you in the "CGI" method below.
  32.  
  33. Half way through the "CGI" method of the "theCGI" object you will see my comments explaining the environment at that point and how to send cgi output. At this point you have an associative array called "h" that has all the form elements in it and you also have a reference to this users session class. Use the "out" method to send html back to the browser. See the comments and example in the code for how to do this.
  34.  
  35. The framework handles the 32k maximum for a single apple event return to the server by sending multiple events if necessary. this is transparent to your program. NOTE: this is not supported for Personal Web Sharing or non threaded servers.
  36.  
  37. This framework currently requires an Alpha version of REALbasic 2.1, I have no plans to port it to earlier versions.
  38.  
  39. ______________________________________________________
  40.  
  41. This is a framework and not a finished product. It is offered AS IS with no expressed or implied warrenty of any kind as to it's suitability for any task. The developer using this framework assumes all responsibility for any application they create and will not hold James Sentman in any way responsible for them or their performance.
  42.  
  43.